<html>
<head><meta charset="utf-8"><title>CLion Debugger · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/CLion.20Debugger.html">CLion Debugger</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="210374397"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/CLion%20Debugger/near/210374397" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Hameer Abbasi <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/CLion.20Debugger.html#210374397">(Sep 17 2020 at 11:05)</a>:</h4>
<p>Hello, has anyone got debugging of the compiler working for CLion? I can't see any locals; I added <code>x.py</code> as a custom build task.</p>



<a name="210378105"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/CLion%20Debugger/near/210378105" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Hameer Abbasi <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/CLion.20Debugger.html#210378105">(Sep 17 2020 at 11:54)</a>:</h4>
<p>Or if someone else has a way to debug the compiler that'd be welcome too. I've seen <a href="https://rustc-dev-guide.rust-lang.org/compiler-debugging.html">https://rustc-dev-guide.rust-lang.org/compiler-debugging.html</a> but it doesn't explain IDE setup, stepping through rust code, etc.</p>



<a name="210381292"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/CLion%20Debugger/near/210381292" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/CLion.20Debugger.html#210381292">(Sep 17 2020 at 12:28)</a>:</h4>
<p>Try <a href="https://rustc-dev-guide.rust-lang.org/building/suggested.html#configuring-rust-analyzer-for-rustc">https://rustc-dev-guide.rust-lang.org/building/suggested.html#configuring-rust-analyzer-for-rustc</a>, it's meant for VSCode but I bet you could adapt it</p>



<a name="210400490"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/CLion%20Debugger/near/210400490" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Hameer Abbasi <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/CLion.20Debugger.html#210400490">(Sep 17 2020 at 14:48)</a>:</h4>
<p>Hi. I'm on macOS Catalina 10.15.6. <code>lldb</code> seems to be broken as all hell... <code>fr v -a</code> outputs nothing.</p>
<p>Perhaps it's just the new Xcode.</p>



<a name="210401017"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/CLion%20Debugger/near/210401017" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Hameer Abbasi <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/CLion.20Debugger.html#210401017">(Sep 17 2020 at 14:52)</a>:</h4>
<p>Hmm, this is weird. <code>lldb</code> works with a regular <code>.rs</code> file, but not in the compiler's code itself.</p>



<a name="210404798"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/CLion%20Debugger/near/210404798" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/CLion.20Debugger.html#210404798">(Sep 17 2020 at 15:16)</a>:</h4>
<p><span class="user-mention silent" data-user-id="256313">Hameer Abbasi</span> <a href="#narrow/stream/182449-t-compiler.2Fhelp/topic/CLion.20Debugger/near/210400490">said</a>:</p>
<blockquote>
<p>Hi. I'm on macOS Catalina 10.15.6. <code>lldb</code> seems to be broken as all hell... <code>fr v -a</code> outputs nothing.</p>
<p>Perhaps it's just the new Xcode.</p>
</blockquote>
<p>do you have debug symbols on? try <code>debug = true</code> in config.toml</p>



<a name="210404904"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/CLion%20Debugger/near/210404904" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Hameer Abbasi <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/CLion.20Debugger.html#210404904">(Sep 17 2020 at 15:17)</a>:</h4>
<p>I do. :/ It hits breakpoints just fine, just locals are missing.</p>



<a name="210404927"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/CLion%20Debugger/near/210404927" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/CLion.20Debugger.html#210404927">(Sep 17 2020 at 15:17)</a>:</h4>
<p><span class="user-mention silent" data-user-id="256313">Hameer Abbasi</span> <a href="#narrow/stream/182449-t-compiler.2Fhelp/topic/CLion.20Debugger/near/210404904">said</a>:</p>
<blockquote>
<p>I do. :/ It hits breakpoints just fine, just locals are missing.</p>
</blockquote>
<p>you need <code>debuginfo = 2</code> then</p>



<a name="210404947"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/CLion%20Debugger/near/210404947" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/CLion.20Debugger.html#210404947">(Sep 17 2020 at 15:17)</a>:</h4>
<p>but be warned that takes like 10 extra minutes to compile</p>



<a name="210404971"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/CLion%20Debugger/near/210404971" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/CLion.20Debugger.html#210404971">(Sep 17 2020 at 15:17)</a>:</h4>
<p>(possibly more if you start swapping)</p>



<a name="210405118"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/CLion%20Debugger/near/210405118" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/CLion.20Debugger.html#210405118">(Sep 17 2020 at 15:18)</a>:</h4>
<p>what are you using the debugger for by the way? there might be an easier way</p>



<a name="210405423"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/CLion%20Debugger/near/210405423" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Hameer Abbasi <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/CLion.20Debugger.html#210405423">(Sep 17 2020 at 15:20)</a>:</h4>
<p>See: <a href="#narrow/stream/146212-t-compiler.2Fconst-eval/topic/Looking.20for.20help.20on.20.2353325">https://rust-lang.zulipchat.com/#narrow/stream/146212-t-compiler.2Fconst-eval/topic/Looking.20for.20help.20on.20.2353325</a></p>
<p>Mainly for familiarity with the codebase. :)</p>



<a name="210406946"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/CLion%20Debugger/near/210406946" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/CLion.20Debugger.html#210406946">(Sep 17 2020 at 15:32)</a>:</h4>
<p>hmm, I wouldn't expect you to need locals for that</p>



<a name="210481142"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/CLion%20Debugger/near/210481142" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Hameer Abbasi <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/CLion.20Debugger.html#210481142">(Sep 18 2020 at 05:53)</a>:</h4>
<p>It’s just so I know what’s going on and what’s being passed around.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>